package org.xxmi.interview;

import org.junit.Test;

import java.util.Arrays;
import java.util.Date;
import java.util.StringTokenizer;

public class Test2 extends Date {

    public void test(){
        System.out.println(super.getClass().getName());
        System.out.println(super.getClass().getSuperclass().getName());
    }

    public static void main(String[] args) {
        new Test2().test();
        String a = "";

        System.out.println("==========================");
        String str = "a,b,c,d";
        String[] split = str.split(",");
        System.out.println(Arrays.toString(split));
        StringTokenizer tokenizer = new StringTokenizer(str,",");
        String[] result = new String[tokenizer.countTokens()];
        int i =0;
        while (tokenizer.hasMoreTokens()){
            result[i] = tokenizer.nextToken();
            i++;
        }
        System.out.println(Arrays.toString(result));
        System.out.println(result.length);
    }
}
